home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / program / swmp141.zip / PAS_SDK.ZIP / EXAMPLE1.PAS < prev    next >
Pascal/Delphi Source File  |  1995-12-12  |  716b  |  28 lines

  1. PROGRAM DOS_Player;
  2. {$M $1000,0,0}       {* Set heap size to zero !!! *}
  3.  
  4. USES    ModPlay,Dos;
  5.  
  6. VAR     Shell: STRING[128];
  7.  
  8.  
  9. BEGIN
  10.   IF ParamCount > 0 THEN
  11.   BEGIN
  12.     Mod_Init(Detection,0,0,0);
  13.     Mod_Load(ParamStr(1));
  14.     IF Channels<>0 THEN
  15.     BEGIN
  16.       Mod_Play(1);
  17.       Shell:=GetEnv('COMSPEC');
  18.       IF Shell='' THEN Shell:='C:\COMMAND.COM';
  19.       WriteLn;
  20.       WriteLn('Shelling to DOS... To stop background music enter EXIT !');
  21.       SwapVectors;
  22.       Exec(Shell,'');
  23.       SwapVectors;
  24.       WriteLn('Returned... Music output stopped');
  25.     END ELSE WriteLn('Unable to output soundfile...');
  26.   END ELSE WriteLn('Please specify a modulefile on the commandline !');
  27. END.
  28.